package com.kmxd.ams.client.event.message;

import com.kmxd.ams.client.event.AmsEvent;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

/**
 * 发送消息对象
 *
 * @author zuolg
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@ToString(callSuper = true)
public class MessageTodoEvent extends AmsEvent {

  private final Long comId;

  /** 标题 */
  private final String title;

  /** 接收对象 */
  private final Long reciveUser;

  /** 接收角色 */
  private final Long reciveRole;

  /** 内容 */
  private final String msgContent;

  /** 打开的页面参数 */
  private String openPage;

  /** 参数信息，根据业务自己定义 */
  private final String openParameter;

  /**
   * 发送消息Event
   *
   * @param title 标题
   * @param reciveUser 接收用户
   * @param reciveRole 接收角色
   * @param msgContent 内容
   */
  public MessageTodoEvent(
      Long comId,
      String title,
      Long reciveUser,
      Long reciveRole,
      String msgContent,
      String openParameter) {
    this.comId = comId;
    this.title = title;
    this.reciveUser = reciveUser;
    this.reciveRole = reciveRole;
    this.msgContent = msgContent;
    this.openParameter = openParameter;
  }

  /**
   * 发送消息Event
   *
   * @param title 标题
   * @param reciveUser 接收用户
   * @param reciveRole 接收角色
   * @param msgContent 内容
   * @param openPage 页面
   */
  public MessageTodoEvent(
      Long comId,
      String title,
      Long reciveUser,
      Long reciveRole,
      String msgContent,
      String openPage,
      String openParameter) {
    this.comId = comId;
    this.title = title;
    this.reciveUser = reciveUser;
    this.reciveRole = reciveRole;
    this.msgContent = msgContent;
    this.openPage = openPage;
    this.openParameter = openParameter;
  }
}
